package main

import (
	"dogapm"
	pb "proto"
	"usrsvc/grpc"
)

func main() {
	// 初始化db和redis连接,grpcclient
	dogapm.Infra.NewInfra(
		dogapm.WithMySql("root:zzzfff0613@tcp(127.0.0.1:3306)/usersvc"),
		dogapm.WithRDB("127.0.0.1:6379"),
		dogapm.InfraEnableAPM("127.0.0.1:54317"),
	)

	// 启动grpc 服务
	grpcserver := dogapm.NewGrpcServer(":8082")
	pb.RegisterUserServiceServer(grpcserver, &grpc.UserServer{})
	dogapm.EndPoint.Start()
}
